package com.xiafei.onenet.common;

/**
 * 常量池
 */
public enum Constant {
    DEVICES("devices", "创建设备"),
    NBIOT("nbiot", "读设备资源"),
    EXECUTE("nbiot/execute", "下发命令"),
    RESOURCES("nbiot/resources", "获取资源列表"),
    OBSERVE("nbiot/observe", "订阅"),
    DATAPOINTS("devices/%s/datapoints", "订阅"),
    ;

    Constant(String url, String intro) {
        this.url = url;
        this.intro = intro;
    }


    private String url;
    private String intro;

    public String getUrl(String... arg) {
        return UrlBuilder.builder(String.format(url,arg));
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }
}
